package o;

import com.huawei.appgallery.foundation.store.bean.splitinstall.BundleInstallResultCache;
import com.huawei.appgallery.foundation.store.bean.splitinstall.BundleInstallResultReportResBean;
import com.huawei.appgallery.serverreqkit.api.bean.ResponseBean;
import com.huawei.appgallery.serverreqkit.api.listener.IServerCallBack;

public class cgf implements IServerCallBack {
    private boolean ˊ = false;

    public cgf(boolean z) {
        this.ˊ = z;
    }

    public void notifyResult(BaseRequest o_cvu, ResponseBean responseBean) {
        cgj o_cgj = (cgj) o_cvu;
        if (responseBean.getResponseCode() != 0 || responseBean.getRtnCode_() != 0) {
            if (!this.ˊ && o_cgj.ˊ() == 0) {
                ˋ(o_cgj);
            }
            Logger.ˋ("BundleInstallResultCallBack", "getResponseCode()=" + responseBean.getResponseCode() + " RtnDesc_:" + ((BundleInstallResultReportResBean) responseBean).getRtnDesc_());
        } else if (this.ˊ) {
            cgd.ˎ().ˏ(o_cgj.ʻ());
        }
    }

    private void ˋ(cgj o_cgj) {
        Logger.ˎ("BundleInstallResultCallBack", "save bundle install record");
        BundleInstallResultCache bundleInstallResultCache = new BundleInstallResultCache();
        bundleInstallResultCache.ˊ(o_cgj.ॱ());
        bundleInstallResultCache.ˏ(o_cgj.ʽ());
        bundleInstallResultCache.ॱ(o_cgj.ॱॱ());
        bundleInstallResultCache.ॱ(o_cgj.ˋ());
        bundleInstallResultCache.ˎ(o_cgj.ˏ());
        bundleInstallResultCache.ˎ(o_cgj.ˊ());
        bundleInstallResultCache.ˋ(o_cgj.getServiceType_());
        bundleInstallResultCache.ˋ(o_cgj.ʻ());
        bundleInstallResultCache.ˊ(o_cgj.ˎ());
        cgd.ˎ().ˋ(bundleInstallResultCache);
    }

    public void prePostResult(BaseRequest o_cvu, ResponseBean responseBean) {
    }
}
